{{ define "admin/goodsType/index.html" }}
{{ template "admin/common/page_header.html" .}}



<div class="container-fluid p-t-15">
    <div class="row">
        <div class="col-lg-12">
            <div class="card">
                <div class="card-toolbar d-flex flex-column flex-md-row">
                    <div class="toolbar-btn-action">
                        <a href="/admin/goodsType/add" class="btn btn-primary fr">增加商品类型</a>
                    </div>

                </div>
                <div class="card-body">
                    <table class="table table-bordered">
                        <thead>
                        <tr class="th">
                            <th>商品类型名称</th>
                            <th>商品类型描述</th>
                            <th class="text-center">状态</th>
                            <th class="text-center">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        {{range $key,$value := .goodsTypeList}}
                            <tr>
                                <td>{{$value.Title}}</td>
                                <td>{{$value.Description}}</td>
                                <td class="text-center">
                                    {{if eq $value.Status 1}}
                                        <img src="/static/admin/images/yes.gif"  class="chStatus" data-id="{{$value.Id}}" data-table="goods_type" data-field="status" />
                                    {{else}}
                                        <img src="/static/admin/images/no.gif"  class="chStatus" data-id="{{$value.Id}}" data-table="goods_type" data-field="status" />
                                    {{end}}
                                </td>
                                <td class="text-center">
                                    <a href="/admin/goodsTypeAttribute?id={{$value.Id}}">商品类型属性</a> 　
                                    <a href="/admin/goodsType/edit?id={{$value.Id}}">修改</a> 　
                                    <a class="delete"
                                       href="/admin/goodsType/delete?id={{$value.Id}}">删除</a>
                                </td>
                            </tr>
                        {{end}}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
{{end}}